 DIDO Utility V1.00 User Guide
====================================================


============================
  Hardware placement
=============================

DIDO boards position on Mother board :

    +---------------------+
    |                     |
    |       +-----+       |
    |       | CPU |       |
    |       +-----+       |
    |                     |
    |       +-----+       |
    |       | BRD |       |
    +-------+-----+-------+


DIDO board pin definition:

    +===================================================+
    |  10    9    8    7    6    5    4    3    2    1  |
    +===================================================+
       |     |    |    |    |    |    |    |    |    |
      GND   DI4  DI3  DI2  DI1  DO4  DO3  DO2  DO1  VCC

   PIN    HW     ID      Description
  =====  =====  =====  ========================
  PIN1   VCC             VCC
  PIN2	 DO_1    01      Digital Output 1
  PIN3	 DO_2    02      Digital Output 2
  PIN4	 DO_3    03      Digital Output 3
  PIN5	 DO_4    04      Digital Output 4
  PIN6	 DI_1    11      Digital Input 1
  PIN7	 DI_2    12      Digital Input 2
  PIN8	 DI_3    13      Digital Input 3
  PIN9	 DI_4    14      Digital Input 4
  PIN10  GND             Ground

============================
  Application Guide
=============================

1. Appilication Options:

  Options:
  -h, -?       : Help information.
  -get n       : Get GPIO PIN n status. n = 01~04 or 11~14
  -set n in    : Set GPIO PIN n as input. n = 01~04 or 11~14
  -set n out v : Set GPIO PIN n as output, and value = v (1 or 0).
  -all         : Show all DIDO status.


Note: Due to HW circuit, each pin is fixed to its usage(Input or Output) as HW definition.
      It is impossible to overdrive the signal by altering its direction. For example,
      PIN 1 (DI_1) cannot set to output pin or set its high/low. PIN 2 (DO_1) cannot set
      to input pin to receive signal.

2. Example: These commands must run under Administrator Command Prompt.

  2-1. Get DIO board DI_2 (PIN 7) status,

       MB1_DIDOx64 -get 12

  Result:
       
       GP12 : Input(0)  Low(0)

  2-2. Set DIO board  DO_4 (PIN 5) to high,

       MB1_DIDOx64 -set 04 out 1
  

  2-3. Show all DIDO status ,
       MB1_DIDOx64 -all

  Result:
  Borad DIO Status :
             OOOO-IIII
      DIO    1234-1234
             ==== ====
     In/Out: OOOO IIII
     Level : 0001 0000





============================
  Factory test cases design
=============================

Purpose: Make DIDO test board to cross-verify the DIDO functions.

Procedure:
 1. Connect the DIDO board to the DIDO test board.

 2. Install Board; Set PINs 6, 7, 8, 9 as Input; PINs 1, 2, 3, 4 as Output.
    Case A: Set all Output level to Low; It is expected that other input PINs should be pulled low,
            and eventually all PINs levels should be 0 and LED 1-4 on DIDO test board are all on.

       MB1_DIDOx64 -set 11 in
       MB1_DIDOx64 -set 12 in
       MB1_DIDOx64 -set 13 in
       MB1_DIDOx64 -set 14 in
       MB1_DIDOx64 -set 01 out 0
       MB1_DIDOx64 -set 02 out 0
       MB1_DIDOx64 -set 03 out 0
       MB1_DIDOx64 -set 04 out 0
       MB1_DIDOx64 -all

  Result:
  Borad DIO Status :
             OOOO-IIII
      DIO    1234-1234
             ==== ====
     In/Out: OOOO IIII
     Level : 0000 0000


    Case B: Set all Output level to High; It is expected that other input PINs should be pulled high,
            and eventually all PINs levels should be 1 and LED 1-4 on DIDO test board are all off.

       MX1_DIDOx64 -set 01 out 1
       MX1_DIDOx64 -set 02 out 1
       MX1_DIDOx64 -set 03 out 1
       MX1_DIDOx64 -set 04 out 1
       MB1_DIDOx64 -all

  Result:
  Borad 1 DIO Status :
             OOOO-IIII
      DIO    1234-1234
             ==== ====
     In/Out: OOOO IIII
     Level : 1111 1111

 3. Use the button of the DIDO test board to verify DIO
    Case A: 1) Set all Output level to High; It is expected that other input PINs should be pulled high,
               and eventually all PINs levels should be 1 and LED 1-4 on DIDO test board are all off.

       MX1_DIDOx64 -set 01 out 1
       MX1_DIDOx64 -set 02 out 1
       MX1_DIDOx64 -set 03 out 1
       MX1_DIDOx64 -set 04 out 1
       MB1_DIDOx64 -all

  Result:
  Borad 1 DIO Status :
             OOOO-IIII
      DIO    1234-1234
             ==== ====
     In/Out: OOOO IIII
     Level : 1111 1111

            2) Press button 1 and don't release button and the GPI 1 PIN levels should be 0

       MB1_DIDOx64 -all

  Result:
  Borad 1 DIO Status :
             OOOO-IIII
      DIO    1234-1234
             ==== ====
     In/Out: OOOO IIII
     Level : 1111 0111

    Case B: Release button 1 and the GPI 1 PIN levels should be 1

       MB1_DIDOx64 -all

  Result:
  Borad 1 DIO Status :
             OOOO-IIII
      DIO    1234-1234
             ==== ====
     In/Out: OOOO IIII
     Level : 1111 1111
